Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for syntax errors due to md language tags #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kamaravichow
Copy link

updated regex issue and tested it on https://regex101.com

here is the final regex

/```(tsx|typescript|javascript)/g

Copy link

vercel bot commented Aug 4, 2024

@kamaravichow is attempting to deploy a commit to the Hassanteam Team on Vercel.

A member of the Team first needs to authorize it.

@kamaravichow
Copy link
Author

If even this doesn't work how about

text = text.replace("```tsx", "");
text = text.replace("```typescript", "");
text = text.replace("```javascript", "");
text = text.replace("```", "");

@yavin5
Copy link

yavin5 commented Aug 4, 2024

The question mark in the below regex has to be present for it to work as intended:

 text = text.replace(/```(tsx|typescript|javascript)?/g, "");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants